<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">

<head>
    <meta charset="UTF-8">
    <title>首页</title>
</head>
<body>
<h1>首页</h1>
<h2 th:text="${msg}"></h2>
<div shiro:notAuthenticated="user">
    <p><a th:href="@{/toLogin}">登录</a></p>
</div>
<div shiro:hasPermission="user:add">
    <p><a th:href="@{'/user/toAdd'}">add</a></p>
</div>
<div shiro:hasPermission="user:update">
    <p><a th:href="@{'/user/toUpdate'}">update</a></p>
</div>
</body>
</html>